package com.dao.student.imp;

import java.util.List;

import javax.annotation.Resource;

import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.stereotype.Repository;

import com.dao.student.SmessageDaoH;
import com.po.SmessageH;

@Repository
public class SmessageDaoImpH implements SmessageDaoH{

	@Resource(name="sqlSessionTemplate")
	private SqlSessionTemplate sqlSessionTemplate;
	
	@Override
	public List<SmessageH> getMessageList() {
		// TODO Auto-generated method stub
		List<SmessageH> messagelist = sqlSessionTemplate.selectList("getMessageList");
		return messagelist;
	}

	@Override
	public int addMessage(SmessageH message) {
		// TODO Auto-generated method stub
		int result = sqlSessionTemplate.insert("addMessage",message);
		return result;
	}
	
}
